<!DOCTYPE html>
<html>

<body>
    <h2>添加自定义词汇</h2>
    <form method="post" enctype="multipart/form-data">
        仮名: <input name="hiragana"><br>
        漢字: <input name="kanji"><br>
        中文: <input name="meaning"><br>


        <div class="form-group">
            <label for="csv-upload">从文件加载 (CSV):</label>
            <input type="file" id="csv-upload" name="csv_file" accept=".csv">
        </div>
        
        <a href="/download-template" class="btn">下载词汇文件模板</a>
         <br>
     
        <button type="submit">添加</button>

       

    </form>
    <a href="/word">返回练习</a>

    <h3>现有词汇:</h3>
    <table border="3">
        <tr>
            <th>平假名</th>
            <th>日本語漢字</th>
            <th>中文</th>
        </tr>
        {% for word in vocab %}
        <tr>
            <td>{{ word[0] }}</td>
            <td>{{ word[1] }}</td>
            <td>{{ word[2] }}</td>
        </tr>
        {% endfor %}
    </table>
</body>

</html>